package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.qf.mapper.DtsAdminMapper;
import com.qf.pojo.DtsAdmin;
import com.qf.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @version v1.0.0
 * @Description:
 * @author: 姜红凯
 * @date: 2022.02.18
 * @since 1.0
 */
@Service
public class AdminServiceImpl implements AdminService {


    @Autowired
    DtsAdminMapper adminMapper;

    @Override
    public DtsAdmin findByUsername(String username) {

        LambdaQueryWrapper<DtsAdmin> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(DtsAdmin::getUsername, username);

        DtsAdmin admin = adminMapper.selectOne(wrapper);
        return admin;
    }
}
